Integrand size = 33, antiderivative size = 67 \[ \int \frac {(A+B \sin (e+f x)) (c+d \sin (e+f x))}{a+a \sin (e+f x)} \, dx=\frac {(B (c-d)+A d) x}{a}-\frac {B d \cos (e+f x)}{a f}-\frac {(A-B) (c-d) \cos (e+f x)}{a f (1+\sin (e+f x))} \]
Time = 0.44 (sec) , antiderivative size = 126, normalized size of antiderivative = 1.88 \[ \int \frac {(A+B \sin (e+f x)) (c+d \sin (e+f x))}{a+a \sin (e+f x)} \, dx=\frac {\left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right ) \left (\cos \left (\frac {1}{2} (e+f x)\right ) ((B (c-d)+A d) (e+f x)-B d \cos (e+f x))+(2 A c+B (c-d) (-2+e+f x)+A d (-2+e+f x)-B d \cos (e+f x)) \sin \left (\frac {1}{2} (e+f x)\right )\right )}{a f (1+\sin (e+f x))} \]
((Cos[(e + f*x)/2] + Sin[(e + f*x)/2])*(Cos[(e + f*x)/2]*((B*(c - d) + A*d )*(e + f*x) - B*d*Cos[e + f*x]) + (2*A*c + B*(c - d)*(-2 + e + f*x) + A*d* (-2 + e + f*x) - B*d*Cos[e + f*x])*Sin[(e + f*x)/2]))/(a*f*(1 + Sin[e + f* x]))
Time = 0.54 (sec) , antiderivative size = 69, normalized size of antiderivative = 1.03, number of steps used = 8, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.242, Rules used = {3042, 3447, 3042, 3502, 3042, 3214, 3042, 3127}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {(A+B \sin (e+f x)) (c+d \sin (e+f x))}{a \sin (e+f x)+a} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {(A+B \sin (e+f x)) (c+d \sin (e+f x))}{a \sin (e+f x)+a}dx\) |
\(\Big \downarrow \) 3447 |
\(\displaystyle \int \frac {(A d+B c) \sin (e+f x)+A c+B d \sin ^2(e+f x)}{a \sin (e+f x)+a}dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {(A d+B c) \sin (e+f x)+A c+B d \sin (e+f x)^2}{a \sin (e+f x)+a}dx\) |
\(\Big \downarrow \) 3502 |
\(\displaystyle \frac {\int \frac {a A c+a (B (c-d)+A d) \sin (e+f x)}{\sin (e+f x) a+a}dx}{a}-\frac {B d \cos (e+f x)}{a f}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \frac {a A c+a (B (c-d)+A d) \sin (e+f x)}{\sin (e+f x) a+a}dx}{a}-\frac {B d \cos (e+f x)}{a f}\) |
\(\Big \downarrow \) 3214 |
\(\displaystyle \frac {a (A-B) (c-d) \int \frac {1}{\sin (e+f x) a+a}dx+x (A d+B (c-d))}{a}-\frac {B d \cos (e+f x)}{a f}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {a (A-B) (c-d) \int \frac {1}{\sin (e+f x) a+a}dx+x (A d+B (c-d))}{a}-\frac {B d \cos (e+f x)}{a f}\) |
\(\Big \downarrow \) 3127 |
\(\displaystyle \frac {x (A d+B (c-d))-\frac {a (A-B) (c-d) \cos (e+f x)}{f (a \sin (e+f x)+a)}}{a}-\frac {B d \cos (e+f x)}{a f}\) |
-((B*d*Cos[e + f*x])/(a*f)) + ((B*(c - d) + A*d)*x - (a*(A - B)*(c - d)*Co s[e + f*x])/(f*(a + a*Sin[e + f*x])))/a
3.3.67.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> Simp[-Cos[c + d*x]/(d*(b + a*Sin[c + d*x])), x] /; FreeQ[{a, b, c, d}, x] && EqQ[a^2 - b ^2, 0]
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])/((c_.) + (d_.)*sin[(e_.) + (f_. )*(x_)]), x_Symbol] :> Simp[b*(x/d), x] - Simp[(b*c - a*d)/d Int[1/(c + d *Sin[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0]
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Int[(a + b*Sin[e + f*x])^m*(A*c + (B*c + A*d)*Sin[e + f*x] + B*d*Sin[e + f*x]^2), x] /; FreeQ[{a, b, c, d, e, f, A, B, m}, x] && NeQ[b*c - a*d, 0]
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(-C)*Co s[e + f*x]*((a + b*Sin[e + f*x])^(m + 1)/(b*f*(m + 2))), x] + Simp[1/(b*(m + 2)) Int[(a + b*Sin[e + f*x])^m*Simp[A*b*(m + 2) + b*C*(m + 1) + (b*B*(m + 2) - a*C)*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, e, f, A, B, C, m}, x] && !LtQ[m, -1]
Time = 0.65 (sec) , antiderivative size = 81, normalized size of antiderivative = 1.21
method | result | size |
derivativedivides | \(\frac {-\frac {2 \left (A c -d A -B c +d B \right )}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1}-\frac {2 d B}{1+\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )}+2 \left (d A +B c -d B \right ) \arctan \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{a f}\) | \(81\) |
default | \(\frac {-\frac {2 \left (A c -d A -B c +d B \right )}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1}-\frac {2 d B}{1+\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )}+2 \left (d A +B c -d B \right ) \arctan \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{a f}\) | \(81\) |
parallelrisch | \(\frac {\left (\left (2 c f x -2 d f x -4 c +3 d \right ) B +4 \left (\left (\frac {f x}{2}-1\right ) d +c \right ) A \right ) \sin \left (\frac {f x}{2}+\frac {e}{2}\right )+\left (\left (2 c f x -2 d f x -3 d \right ) B +2 A d f x \right ) \cos \left (\frac {f x}{2}+\frac {e}{2}\right )-d B \left (\cos \left (\frac {3 f x}{2}+\frac {3 e}{2}\right )+\sin \left (\frac {3 f x}{2}+\frac {3 e}{2}\right )\right )}{2 a f \left (\sin \left (\frac {f x}{2}+\frac {e}{2}\right )+\cos \left (\frac {f x}{2}+\frac {e}{2}\right )\right )}\) | \(130\) |
risch | \(\frac {x d A}{a}+\frac {x B c}{a}-\frac {x d B}{a}-\frac {B d \,{\mathrm e}^{i \left (f x +e \right )}}{2 a f}-\frac {B d \,{\mathrm e}^{-i \left (f x +e \right )}}{2 a f}-\frac {2 A c}{f a \left ({\mathrm e}^{i \left (f x +e \right )}+i\right )}+\frac {2 d A}{f a \left ({\mathrm e}^{i \left (f x +e \right )}+i\right )}+\frac {2 B c}{f a \left ({\mathrm e}^{i \left (f x +e \right )}+i\right )}-\frac {2 d B}{f a \left ({\mathrm e}^{i \left (f x +e \right )}+i\right )}\) | \(158\) |
norman | \(\frac {\frac {\left (d A +B c -d B \right ) x}{a}+\frac {\left (d A +B c -d B \right ) x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{a}+\frac {\left (d A +B c -d B \right ) x \left (\tan ^{4}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{a}+\frac {\left (d A +B c -d B \right ) x \left (\tan ^{5}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{a}-\frac {2 A c -2 d A -2 B c +4 d B}{a f}-\frac {2 d B \left (\tan ^{3}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{a f}-\frac {2 d B \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{a f}+\frac {2 \left (d A +B c -d B \right ) x \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{a}+\frac {2 \left (d A +B c -d B \right ) x \left (\tan ^{3}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{a}-\frac {\left (2 A c -2 d A -2 B c +2 d B \right ) \left (\tan ^{4}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{a f}-\frac {2 \left (2 A c -2 d A -2 B c +3 d B \right ) \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{a f}}{\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right ) \left (1+\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )^{2}}\) | \(319\) |
2/f/a*(-(A*c-A*d-B*c+B*d)/(tan(1/2*f*x+1/2*e)+1)-d*B/(1+tan(1/2*f*x+1/2*e) ^2)+(A*d+B*c-B*d)*arctan(tan(1/2*f*x+1/2*e)))
Leaf count of result is larger than twice the leaf count of optimal. 154 vs. \(2 (67) = 134\).
Time = 0.26 (sec) , antiderivative size = 154, normalized size of antiderivative = 2.30 \[ \int \frac {(A+B \sin (e+f x)) (c+d \sin (e+f x))}{a+a \sin (e+f x)} \, dx=-\frac {B d \cos \left (f x + e\right )^{2} - {\left (B c + {\left (A - B\right )} d\right )} f x + {\left (A - B\right )} c - {\left (A - B\right )} d - {\left ({\left (B c + {\left (A - B\right )} d\right )} f x - {\left (A - B\right )} c + {\left (A - 2 \, B\right )} d\right )} \cos \left (f x + e\right ) - {\left ({\left (B c + {\left (A - B\right )} d\right )} f x - B d \cos \left (f x + e\right ) + {\left (A - B\right )} c - {\left (A - B\right )} d\right )} \sin \left (f x + e\right )}{a f \cos \left (f x + e\right ) + a f \sin \left (f x + e\right ) + a f} \]
-(B*d*cos(f*x + e)^2 - (B*c + (A - B)*d)*f*x + (A - B)*c - (A - B)*d - ((B *c + (A - B)*d)*f*x - (A - B)*c + (A - 2*B)*d)*cos(f*x + e) - ((B*c + (A - B)*d)*f*x - B*d*cos(f*x + e) + (A - B)*c - (A - B)*d)*sin(f*x + e))/(a*f* cos(f*x + e) + a*f*sin(f*x + e) + a*f)
Leaf count of result is larger than twice the leaf count of optimal. 1307 vs. \(2 (49) = 98\).
Time = 1.04 (sec) , antiderivative size = 1307, normalized size of antiderivative = 19.51 \[ \int \frac {(A+B \sin (e+f x)) (c+d \sin (e+f x))}{a+a \sin (e+f x)} \, dx=\text {Too large to display} \]
Piecewise((-2*A*c*tan(e/2 + f*x/2)**2/(a*f*tan(e/2 + f*x/2)**3 + a*f*tan(e /2 + f*x/2)**2 + a*f*tan(e/2 + f*x/2) + a*f) - 2*A*c/(a*f*tan(e/2 + f*x/2) **3 + a*f*tan(e/2 + f*x/2)**2 + a*f*tan(e/2 + f*x/2) + a*f) + A*d*f*x*tan( e/2 + f*x/2)**3/(a*f*tan(e/2 + f*x/2)**3 + a*f*tan(e/2 + f*x/2)**2 + a*f*t an(e/2 + f*x/2) + a*f) + A*d*f*x*tan(e/2 + f*x/2)**2/(a*f*tan(e/2 + f*x/2) **3 + a*f*tan(e/2 + f*x/2)**2 + a*f*tan(e/2 + f*x/2) + a*f) + A*d*f*x*tan( e/2 + f*x/2)/(a*f*tan(e/2 + f*x/2)**3 + a*f*tan(e/2 + f*x/2)**2 + a*f*tan( e/2 + f*x/2) + a*f) + A*d*f*x/(a*f*tan(e/2 + f*x/2)**3 + a*f*tan(e/2 + f*x /2)**2 + a*f*tan(e/2 + f*x/2) + a*f) + 2*A*d*tan(e/2 + f*x/2)**2/(a*f*tan( e/2 + f*x/2)**3 + a*f*tan(e/2 + f*x/2)**2 + a*f*tan(e/2 + f*x/2) + a*f) + 2*A*d/(a*f*tan(e/2 + f*x/2)**3 + a*f*tan(e/2 + f*x/2)**2 + a*f*tan(e/2 + f *x/2) + a*f) + B*c*f*x*tan(e/2 + f*x/2)**3/(a*f*tan(e/2 + f*x/2)**3 + a*f* tan(e/2 + f*x/2)**2 + a*f*tan(e/2 + f*x/2) + a*f) + B*c*f*x*tan(e/2 + f*x/ 2)**2/(a*f*tan(e/2 + f*x/2)**3 + a*f*tan(e/2 + f*x/2)**2 + a*f*tan(e/2 + f *x/2) + a*f) + B*c*f*x*tan(e/2 + f*x/2)/(a*f*tan(e/2 + f*x/2)**3 + a*f*tan (e/2 + f*x/2)**2 + a*f*tan(e/2 + f*x/2) + a*f) + B*c*f*x/(a*f*tan(e/2 + f* x/2)**3 + a*f*tan(e/2 + f*x/2)**2 + a*f*tan(e/2 + f*x/2) + a*f) + 2*B*c*ta n(e/2 + f*x/2)**2/(a*f*tan(e/2 + f*x/2)**3 + a*f*tan(e/2 + f*x/2)**2 + a*f *tan(e/2 + f*x/2) + a*f) + 2*B*c/(a*f*tan(e/2 + f*x/2)**3 + a*f*tan(e/2 + f*x/2)**2 + a*f*tan(e/2 + f*x/2) + a*f) - B*d*f*x*tan(e/2 + f*x/2)**3/(...
Leaf count of result is larger than twice the leaf count of optimal. 256 vs. \(2 (67) = 134\).
Time = 0.30 (sec) , antiderivative size = 256, normalized size of antiderivative = 3.82 \[ \int \frac {(A+B \sin (e+f x)) (c+d \sin (e+f x))}{a+a \sin (e+f x)} \, dx=-\frac {2 \, {\left (B d {\left (\frac {\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + \frac {\sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + 2}{a + \frac {a \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + \frac {a \sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + \frac {a \sin \left (f x + e\right )^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}}} + \frac {\arctan \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}\right )}{a}\right )} - B c {\left (\frac {\arctan \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}\right )}{a} + \frac {1}{a + \frac {a \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}}\right )} - A d {\left (\frac {\arctan \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}\right )}{a} + \frac {1}{a + \frac {a \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}}\right )} + \frac {A c}{a + \frac {a \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}}\right )}}{f} \]
-2*(B*d*((sin(f*x + e)/(cos(f*x + e) + 1) + sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + 2)/(a + a*sin(f*x + e)/(cos(f*x + e) + 1) + a*sin(f*x + e)^2/(cos( f*x + e) + 1)^2 + a*sin(f*x + e)^3/(cos(f*x + e) + 1)^3) + arctan(sin(f*x + e)/(cos(f*x + e) + 1))/a) - B*c*(arctan(sin(f*x + e)/(cos(f*x + e) + 1)) /a + 1/(a + a*sin(f*x + e)/(cos(f*x + e) + 1))) - A*d*(arctan(sin(f*x + e) /(cos(f*x + e) + 1))/a + 1/(a + a*sin(f*x + e)/(cos(f*x + e) + 1))) + A*c/ (a + a*sin(f*x + e)/(cos(f*x + e) + 1)))/f
Leaf count of result is larger than twice the leaf count of optimal. 151 vs. \(2 (67) = 134\).
Time = 0.29 (sec) , antiderivative size = 151, normalized size of antiderivative = 2.25 \[ \int \frac {(A+B \sin (e+f x)) (c+d \sin (e+f x))}{a+a \sin (e+f x)} \, dx=\frac {\frac {{\left (B c + A d - B d\right )} {\left (f x + e\right )}}{a} - \frac {2 \, {\left (A c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - B c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - A d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + B d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + B d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + A c - B c - A d + 2 \, B d\right )}}{{\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1\right )} a}}{f} \]
((B*c + A*d - B*d)*(f*x + e)/a - 2*(A*c*tan(1/2*f*x + 1/2*e)^2 - B*c*tan(1 /2*f*x + 1/2*e)^2 - A*d*tan(1/2*f*x + 1/2*e)^2 + B*d*tan(1/2*f*x + 1/2*e)^ 2 + B*d*tan(1/2*f*x + 1/2*e) + A*c - B*c - A*d + 2*B*d)/((tan(1/2*f*x + 1/ 2*e)^3 + tan(1/2*f*x + 1/2*e)^2 + tan(1/2*f*x + 1/2*e) + 1)*a))/f
Time = 13.56 (sec) , antiderivative size = 122, normalized size of antiderivative = 1.82 \[ \int \frac {(A+B \sin (e+f x)) (c+d \sin (e+f x))}{a+a \sin (e+f x)} \, dx=\frac {x\,\left (A\,d+B\,c-B\,d\right )}{a}-\frac {\left (2\,A\,c-2\,A\,d-2\,B\,c+2\,B\,d\right )\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2+2\,B\,d\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )+2\,A\,c-2\,A\,d-2\,B\,c+4\,B\,d}{f\,\left (a\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3+a\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2+a\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )+a\right )} \]